<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get the SVN blame for a file</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.svn-auth-set-parameter.html">svn_auth_set_parameter</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.svn-cat.html">svn_cat</a></div>
 <div class="up"><a href="ref.svn.html">SVN 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.svn-blame" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">svn_blame</h1>
  <p class="verinfo">(PECL svn &gt;= 0.3.0)</p><p class="refpurpose"><span class="refname">svn_blame</span> &mdash; <span class="dc-title">Get the SVN blame for a file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.svn-blame-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>svn_blame</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$repository_url</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$revision_no</code><span class="initializer"> = SVN_REVISION_HEAD</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Get the SVN blame of a file from a repository URL.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.svn-blame-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">repository_url</code></em></dt>

     <dd>

      <p class="para">
       The repository URL.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">revision_no</code></em></dt>

     <dd>

      <p class="para">
       The revision number.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.svn-blame-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   An <span class="type"><a href="language.types.array.html" class="type array">array</a></span> of SVN blame information separated by line
   which includes the revision number, line number, line of code,
   author, and date.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.svn-blame-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4560">
    <p><strong>Example #1 <span class="function"><strong>svn_blame()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$svnurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'http://svn.example.org/svnroot/foo/trunk/index.php'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">svn_blame</span><span style="color: #007700">(</span><span style="color: #0000BB">$svnurl</span><span style="color: #007700">)&nbsp;);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] = Array
          (
           [rev] = 1
           [line_no] = 1
           [line] = Hello World
           [author] = joesmith
           [date] = 2007-07-02T05:51:26.628396Z
          )
    [1] = Array
          ...
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.svn-blame-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.svn-diff.html" class="function" rel="rdfs-seeAlso">svn_diff()</a> - Recursively diffs two paths</span></li>
    <li class="member"><span class="function"><strong>svn_logs()</strong></span></li>
    <li class="member"><span class="function"><a href="function.svn-status.html" class="function" rel="rdfs-seeAlso">svn_status()</a> - Returns the status of working copy files and directories</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.svn-auth-set-parameter.html">svn_auth_set_parameter</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.svn-cat.html">svn_cat</a></div>
 <div class="up"><a href="ref.svn.html">SVN 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
